|
Printing labels In contrast to table reports, data in reports such as "label," are allocated one under another. Let us examine an example of such report, which displays data about fishes (see the previous example). The report is presented in the form of a label, and has the following structure:
If starting execution of this report, we would receive the following:
As you can see, there is much whitespace in the right part of the page. To fill the whole page, the number of columns, where the data will be displayed, can be set in report page settings. To perform this, you should either doble-click on the area of white space on the page, or call the "File Page|parameters..." menu item.
In this bookmark, one can set such column parameters, as number of columns, its width, and position. In our case, it would be enough to specify a number = 2, since FastReport adjusts all the rest parameters automatically. The column frame is displayed in the designer as a thin vertical line:
At that, printing will be performed in the following way. FastReport will display the "First level data" band as long as there is white space on the page. After that, a new column in the very page will be formed (in contrast to simple reports, in which a new page is created in such cases), and band would continue to be displayed on the top. However, now all the objects are shifted to the right, according to column’s width. It will continue until all the columns are displayed. After that, FastReport forms a new page and continues to display data from the first column. Our report with two columns will look as follows:
The "Columns" property, available in all data-bands, is another way to set number of columns. It allows to set number of columns for a particular band and not for the whole page (as it was in previous example). Thus, the principle of data displaying will be not "from the top to the bottom, then from the left to the right," but "from left to right, then from top to bottom." Let us disable columns in the page (set the columns number = 1) and enter "2" in the "Columns" band property. FastReport displays the column frames as dotted lines. Let us get the required column dimensions by modifying the "ColumnWidth" property:
The report constructed in such way, would differ from the previous one only by the "from-left-to-right, then from-top-to-bottom" order of data displaying. |